﻿using System;
using Budget.Core.DomainModel;
using Budget.Core.Specifications.Base;

namespace Budget.Core.Specifications
{
    public static class IncomeSpecifications
    {
        public static ISpecification<IncomeOrder> ByDate(DateTime date)
        {
            return new QuerySpecification<IncomeOrder>(o => o.CreationDate.Date == date.Date);
        }

         public static ISpecification<IncomeOrder> YoungerThanDate(DateTime date)
         {
             return new QuerySpecification<IncomeOrder>(io => io.CreationDate >= date);
         }
    }
}